﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BaseChatting.aspx.cs" Inherits="BaseChatting" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>fdsaf</title>

    <script type="text/javascript" src="/javascript/jquery-1.3.2.min.js"></script>

    <script src="tiny_mce/tiny_mce_src.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
        tinyMCE.init({
            mode: "exact",
            elements: "msgContent",
            editor_selector: "mceEditor",
            theme: "advanced",
            plugins: "safari,pagebreak,style,advhr,advimage,advlink,iespell,insertdatetime,preview,searchreplace,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,inlinepopups",
            // Theme options
            theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,forecolor,backcolor,|,link,unlink,anchor,cleanup,|,syntaxhl,preview",
            theme_advanced_buttons2: "",
            theme_advanced_buttons3: "",
            theme_advanced_buttons4: "",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_statusbar_location: "bottom",
            theme_advanced_resizing: true,
            remove_linebreaks: false,
            extended_valid_elements: "textarea[cols|rows|disabled|name|readonly|class]",
            content_css: "tiny_mce/themes/simple/skins/o2k7/content.css",
            language: "zh"
        });
    </script>

    <script type="text/javascript" src="/javascript/common.js"></script>

    <script language="javascript" type="text/javascript">

       
        var BUId = '<%=sendBUId %>';
        var BUNickName = '<%=BUNickName %>';
        var RecieveTime = '<%=RecieveTime %>'
      /* $(document).keydown(function(event) {
            tinyMCE.triggerSave(true, true);
            var msgContent = $('#chattingroommsgContent').val();
            ctrlEnterInGroup(event, sendRUId, msgContent, BUNickName);
        });*/

        $(document).ready(function() {

         receiveChattingRoomMsg('<%=RecieveTime %>');

        $('#btnchattingroomSendMsg').click(function() {
                tinyMCE.triggerSave(true, true);
                var msgContent = $('#chattingroommsgContent').val();


                sendChattingroomMsg(BUId, msgContent,BUNickName);
                tinyMCE.getInstanceById("chattingroommsgContent").setContent("");
            });
        });

    </script>

    <style type="text/css">
        #Button1
        {
            text-align: right;
        }
        .style1
        {
            width: 83%;
        }
        .style3
        {
            height: 174px;
            width: 550px;
        }
        .style4
        {
            width: 550px;
        }
        .style5
        {
            color: #FF0000;
        }
        #chattingroommsgContent li
        {
            list-style:none;
            font-size:15px;
        }
        
         #groupMem li
        {
            list-style:none;
            font-size:14px;
        }
        #btnchattingroomSendMsg
        {
            height: 26px;
             font-size:15px;
        }
        #ChattingRoomMem
        {
            width: 210px;
            height: 275px;
            margin-left: 0px;
        }
        .style6
        {
            width: 183px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table class="style1">
        <tr>
            <td class="style3">
                <div style="overflow: scroll; height: 300px;width:100%">
                <ul id="divchattingroomMsgContent"></ul>
                
                </div>
                
            </td>
            <td class="style6">
            <div  style="overflow: scroll; height: 290px; width :100%">
            <ul id="ChattingRoomMem" >
                
                    <asp:Literal ID="Literal1" runat="server" ></asp:Literal>
                
                </ul>
                </div>
            </td>
        </tr>
        <tr>
            <td class="style4" colspan="2">
                &nbsp;<textarea name="chattingroommsgContent" id="chattingroommsgContent" style="height: 80px; width: 100%;" cols="20"
                    rows="1"></textarea></td>
        </tr>
        <tr>
            <td class="style4">
                <input id="btnchattingroomSendMsg" type="button"  value="发送" />
            <span class="style5">可使用Ctrl + Enter键发送&nbsp;&nbsp;&nbsp;&nbsp; </span>
                <asp:Button ID="Button1" runat="server" Text="退出聊天室" OnClick ="exit_click" />
            </td>
        </tr>
        <tr>
            <td class="style4">
                &nbsp;
            </td>
        </tr>
    </table>
    </form>
</body>
</html>

